<template>
	<view>
		<view>
			<view class="header">
				<view class="left" @click="pendApproval">待审批列表</view>
				<view class="right" @click="approved">已审批列表</view>
			</view>

			<!-- 待审批列表 -->
			<view v-if="current == 1" class="pendList">
				<uni-card title="基础卡片" extra="额外信息">
					<view style="display: flex; padding: 40rpx 0;">
						<view style="padding: 0 40rpx 0 0rpx;">
							<image style="width: 220rpx; height: 250rpx;" src="https://tj-1305380059.cos.ap-nanjing.myqcloud.com/pic/A.png" mode="">
							</image>
						</view>
						<view style="margin-left: 20rpx;">
							<view class="">学生姓名：张张张</view>
							<view class="">学生姓名：张张张</view>
							<view class="">学生姓名：张张张</view>
							<view class="">学生姓名：张张张</view>
							<view class="">学生姓名：张张张</view>
							<view class="">学生姓名：张张张</view>
						</view>
					</view>
					<view style="padding: 20rpx 0;">
						<view class="button" @click="toStudentCT">审 批</view>
					</view>
				</uni-card>
			</view>
			<view v-if="current == 2" class="pendList">
				789
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				topName: "宿舍卫生处理",
				userName: "",
				current: 1,
			}
		},
		methods: {
			// 切换到待审批
			pendApproval() {
				this.current = 1
			},
			// 切换到已审批
			approved() {
				this.current = 2
			},
			toStudentCT() {
				uni.navigateTo({
					url: "/pages_main/classTeacher/dormitoryStudentCT/dormitoryStudentCT"
				})
			}
		},
		onLoad() {
			this.userName = uni.getStorageSync("userName")
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.indexContent {
		height: 100vh;
	}

	.header {
		padding: 40rpx 0rpx 0rpx 0rpx;
		display: flex;
	}

	.left {
		width: 50%;
		border-right: 1rpx solid #000;
		text-align: center;
		padding: 20rpx 0;
	}

	.right {
		width: 50%;
		/* border-left: 0.5rpx solid #000; */
		text-align: center;
		padding: 20rpx 0;
	}

	.pendList {
		padding: 20rpx;
	}

	.button {
		width: 50%;
		background-color: #22ad38;
		color: #fff;
		padding: 20rpx;
		border-radius: 10rpx;
		text-align: center;
		font-size: 36rpx;
		margin: 0 auto;
	}
</style>